package cloud.consumer.feign;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @auther xfanonymous
 * @create 2023-12-25 11:22
 *
 * 1. @EnableDiscoveryClient 向使用consul注册服务
 * 2. @EnableFeignClients 开启OpenFeign客户端功能，定义服务+绑定接口，以声明式的方法优雅而简单的实现服务调用
 * 3. 需要指定openFeign接口所在包路径，否则会报错 A component required a bean of type that could not be found.
 */

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.xfanonymous.cloud")
public class MainOpenFeign82 {

    public static void main(String[] args) {
        SpringApplication.run(MainOpenFeign82.class, args);
    }
}